package cn.tedu.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {

    @org.junit.Test
    public void test(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        Demo d=(Demo)ac.getBean("demo");
        System.out.println(d);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
